package com.diy.sigmund.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.diy.sigmund.service.HelloService;
import java.time.LocalDateTime;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ylm-sigmund
 * @since 2023/3/27 22:47
 */
@RestController
public class HelloController {

    @Reference
    private HelloService helloService;

    @RequestMapping("/hello")
    public String hello() {
        String hello = helloService.sayHello("world");
        System.out.println(hello + " " + LocalDateTime.now());
        return hello;
    }
}

